package com.ztgf.shopping.mapper.shop;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.ztgf.shopping.models.bo.shop.ShopOnlineQueryBO;
import com.ztgf.shopping.models.dto.shop.ShopOnlineDTO;
import com.ztgf.shopping.models.vo.shop.ShopOnlineQueryListVO;
import com.ztgf.shopping.models.vo.shop.ShopOnlineVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ShopOnlineMapper extends BaseMapper<ShopOnlineDTO> {

    /**
     * @return : java.util.List<com.ztgf.shopping.models.vo.shop.ShopOnlineQueryListVO>
     * @Author :chenyu.wang
     * @Description : 在线时长统计列表
     * @Date : 16:29 2021.01.12
     * @Param : [page, bo]
     **/
    List<ShopOnlineQueryListVO> queryPageList(Page<ShopOnlineQueryListVO> page, @Param(value = "item") ShopOnlineQueryBO bo);

    /**
     * @return : java.lang.Integer
     * @Author :chenyu.wang
     * @Description : 获取咨询人数
     * @Date : 11:14 2021.01.13
     * @Param : [bo, shopId]
     **/
    Integer getConsultNum(@Param(value = "item") ShopOnlineQueryBO bo, @Param(value = "shopId") Long shopId);

    /**
     * @return : java.lang.Integer
     * @Author :chenyu.wang
     * @Description : 获取回复次数
     * @Date : 11:18 2021.01.13
     * @Param : [bo, shopId]
     **/
    Integer getReplyNum(@Param(value = "item") ShopOnlineQueryBO bo, @Param(value = "shopId") Long shopId);

    /**
     * @return : java.util.List<com.ztgf.shopping.models.vo.shop.ShopOnlineVO>
     * @Author :chenyu.wang
     * @Description : 获取店铺咨询人列表
     * @Date : 16:28 2021.01.15
     * @Param : [bo, shopId]
     **/
    List<ShopOnlineVO> getConsultList(@Param(value = "item") ShopOnlineQueryBO bo, @Param(value = "shopId") Long shopId);

    /**
     * @return : com.ztgf.shopping.models.vo.shop.ShopOnlineVO
     * @Author :chenyu.wang
     * @Description : 获取回复时间
     * @Date : 09:57 2021.01.18
     * @Param : [bo, shopId, sendShopId]
     **/
    ShopOnlineVO getReplyTime(@Param(value = "item") ShopOnlineQueryBO bo, @Param(value = "shopId") Long shopId, @Param(value = "sendShopId") Long sendShopId);

    /**
     * @return : java.lang.Long
     * @Author :chenyu.wang
     * @Description : 获取店铺自定义时间段的在线时长
     * @Date : 2021.02.23 09:39
     * @Param : [shopId, startTime, endTime]
     **/
    Long getShopAutoOnlineTime(@Param("shopId") Long shopId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    /**
     * @return : java.lang.Long
     * @Author :chenyu.wang
     * @Description : 获取店铺imId
     * @Date : 2021.02.24 17:17
     * @Param : [shopId]
     **/
    Long getShopImId(@Param("shopId") Long shopId);
}
